(function (_super) {
    var io = ppt.io;

    function Plane() {
        Plane.super(this);

        this.init();
    }
    Laya.class(Plane, "Game.Plane", _super);
    var _proto = Plane.prototype;
    _proto.destroy = function () {
        _super.prototype.destroy.call(this, true);

        io.unregister("prop::fly", this.fly);

        this.plane = null;
        this.planeWrap = null;
    }

    _proto.init = function () {
        this.centerY = 0;

        io.register("prop::fly", this, this.fly);

        this.flyAni.on(Laya.Event.STOPPED, this, this.reset);
    }
    _proto.reset = function () {
        this.plane.stop();
    }
    _proto.fly = function () {
        this.plane.play(0, true);
        this.flyAni.play(0, false);
    }

    _proto.resize = function (height) {
        this.centerY = 0;
    }
})(ui.Game.UI.PlaneUI);